#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
int main()
{
	char arr[10] = "ABCD";
	int a = 0;
	scanf("%d", &a);
	int b = strlen(arr);
	char* c = arr;
	char* d = arr + 1;
	for (int i = 0; i < a; i++)
	{
		for (int j = 0; j < b-1; j++)
		{
			char tmp = *c;
			*c = *d;
			*d = tmp;
			c++;
			d++;
		}
		c = arr;
		d = arr + 1;
	}
	printf("%s", arr);

	return 0;
}